#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include<functional>

#include <QMainWindow>
#include "treeParse.h"
#include "symboltable.h"
#include <QTextEdit>

#define UNCOMPILED  0
#define LEXICAL     1
#define SYNTAXRD    2
#define SYNTAXLL1   3
#define SYNTAX      4
#define SEMANTIC    5
#define ERROR       6


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    int status;

private slots:
    void on_actionNew_File_triggered();
    void on_actionOpen_File_triggered();
    void on_editorTabWidget_tabCloseRequested(int index);
    void on_actionSave_triggered();
    void on_actionLexical_Analysis_triggered();

    void on_actionSyntax_Analysis_triggered();

    void on_actionClear_message_triggered();

    void on_actionRecursive_triggered();

    void on_actionLL_1_triggered();

    void on_actionSemantic_Analysis_triggered();

private:
    void setCurrentEditorTabTitle(QString filePath);
    void appendFileToTextEdit(const QString filpath,QTextEdit& textEdit);

};

#endif // MAINWINDOW_H
